<%@include file="header.jsp"%>

<% 
  	String idPerfil = null;

	Cookie cookie = null;
	Cookie[] cookies = null;
	
	cookies = request.getCookies();
	if( cookies != null ){
	   for (int i = 0; i < cookies.length; i++){
	      cookie = cookies[i];
	      if(cookie.getName().contentEquals("idPerfil"))
	    	  idPerfil = cookie.getValue();
	   }
	}else{
		response.sendRedirect("../acessoNegado.jsp");
	}	
	
	if(!idPerfil.contentEquals("3"))	
		response.sendRedirect("../acessoNegado.jsp");
%>

<div class="navbar">
  <div class="navbar-inner">
    <div class="container">
      <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </a>
      <a class="brand" href="/ProjetoDWS/"><s:text name="app.title"/></a>
      <div class="nav-collapse">    
       	 <div class="btn-group pull-right">
			<a id="user-name" class="btn dropdown-toggle" data-toggle="dropdown" href="#">
				
			</a>
			<ul class="dropdown-menu">
				<li><a href="" name="trocaNome" id="trocaNome"> Trocar nome</a></li>
				<li><a href="" name="trocaSenha" id="trocaSenha"> Trocar senha</a></li>
				<li class="divider"></li>
				<li><a id="logout" href="#"> Logout</a></li>
			</ul>
		</div>
      </div><!-- /.nav-collapse -->
    </div>
  </div><!-- /navbar-inner -->
</div><!-- /.navbar -->

<p class="pull-right" id="data-msg"></p>